package logic

import (
	"context"
	"zye1/api/internal/svc"
	"zye1/api/internal/types"

	"github.com/zeromicro/go-zero/core/logx"
)

type RealNameLogic struct {
	logx.Logger
	ctx    context.Context
	svcCtx *svc.ServiceContext
}

func NewRealNameLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RealNameLogic {
	return &RealNameLogic{
		Logger: logx.WithContext(ctx),
		ctx:    ctx,
		svcCtx: svcCtx,
	}
}

func (l *RealNameLogic) RealName(req *types.RealNameRequest) (resp *types.RegMsgResponse, err error) {
	// todo: 实名认证

	//if !pkg.RealName(req.Realname, req.Idcatr) {
	//	return &types.RegMsgResponse{
	//		Cre:  -1,
	//		Msg:  "认证失败",
	//		Data: nil,
	//	}, nil
	//}

	return &types.RegMsgResponse{
		Cre:  0,
		Msg:  "认证成功",
		Data: nil,
	}, nil
}
